<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--临时查询form表单,可以增加一些分页的查询参数等,如果某一操作触发当前页面刷新,默认情况下提交此form进行查询-->
<form id="pagerForm" method="get" action="${ctx }/student/getList">
    <input type="hidden" name="pageNum" value="1"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="nickname" value=""/>
    <input type="hidden" name="mobile" value=""/>
    <input type="hidden" name="email" value=""/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" method="get" action="${ctx }/student/getList">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        昵称：<input type="text" name="nickname" value="${nickname}" maxlength="50"/>
                    </td>
                    <td>
                        手机号：<input type="text" name="mobile" value="${mobile}" maxlength="50"/>
                    </td>
                    <td>
                        邮箱：<input type="text" name="email" value="${email}" maxlength="50"/>
                    </td>
                    <td><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
                </tr>
            </table>
        </div>
    </form>
</div>

<div class="pageContent">

    <table class="table" width="100%" layoutH="88">
        <thead>
        <tr>
            <th width="30">序号</th>
            <th width="120">昵称</th>
            <th width="240">邮箱</th>
            <th width="100">手机号</th>
            <th>进度</th>
            <th>已上课时数</th>
            <th width="80" align="center">剩余课时数</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${stuList}" var="stuUser" varStatus="status">
            <tr target="switch_id" rel="${stuUser.userId}">
                <td>${status.index+1}</td>
                <td>${stuUser.nickname}</td>
                <td>${stuUser.email}</td>
                <td>${stuUser.mobile}</td>
                <td>${stuUser.progress}</td>
                <td>${stuUser.consumedLectures }</td>
                <td>${stuUser.balanceLectures }</td>
                <td><a href="${ctx }/student/toRechargeLecture?stuId=${stuUser.userId}" target="dialog" mask="true" rel="recharge_lecture"
                   title="充值课时">充值课时</a></td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
    
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共${totalCount}条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${totalCount}" numPerPage="20" pageNumShown="10" currentPage="${currentPage }"></div>
</div>

</div>
